xml.instruct!(:xml, :version=>"1.0")
xml.kml(:xmlns => "http://earth.google.com/kml/2.0") do
    xml.document do
        xml.distance @route.distance if @route.distance
        xml.traveltime @route.traveltime if @route.traveltime
        xml.folder do
            xml.placemark do
                xml.lineString do
                    xml.coordinates @route.coordinates.join("\n")
                end
            end
        end
    end
end
